//
//  VCPhotoCollectionViewCell.m
//  NBTripe
//
//  Created by 陈曦 on 16/1/16.
//  Copyright © 2016年 Vicki. All rights reserved.
//

#import "VCPhotoCollectionViewCell.h"

@interface VCPhotoCollectionViewCell ()
@property (nonatomic,strong) UIImageView *images;
@end

@implementation VCPhotoCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.images = [[UIImageView alloc] initWithFrame:CGRectZero];
        [self addSubview:self.images];
    }
    return self;
}

-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    [super applyLayoutAttributes:layoutAttributes];
    self.images.frame = self.bounds;
}
-(void)setName:(NSString *)name {
    if (_name != name) {
        _name = name;
    }
    [self.images sd_setImageWithURL:[NSURL URLWithString:name] placeholderImage:[UIImage imageNamed:@"160"]];
}


@end
